<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>编辑银行卡</title>
<link href="${base}/resources/admin/css/amazeui.css" rel="stylesheet" type="text/css" />
<link href="${base}/resources/admin/css/common.css" rel="stylesheet" type="text/css" />

</head>
<body>
	<div class="path">
		<a href="${base}/asl-admin/common/index.htm">${message("admin.path.index")}</a> &raquo; 编辑银行卡
	</div>
	<form id="inputForm" action="update.htm" method="post">
		<input type="hidden" name="id" value="${bankCard.id}" />
		<table class="input">
            <tr>
                <th>
                    icon:
                </th>
                <td>
                    <img class="preImage" src="${bankCard.icon}" />
                </td>
            </tr>
            <tr>
                <th>
                    <span class="requiredField">*</span>用户:
                </th>
                <td>
                    <select name="memberId">
					[#list members as member]<option value="${member.id}" [#if bankCard.member==member] selected[/#if]>${member.username}</option>[/#list]
                    </select>
                </td>
            </tr>
            <tr>
                <th>
                    <span class="requiredField">*</span>真实姓名:
                </th>
                <td>
                    <input type="text" name="name" class="text" value="${bankCard.name}" placeholder="请填写真实姓名"/>
                </td>
            </tr>
            <tr>
                <th>
                    <span class="requiredField">*</span>卡号:
                </th>
                <td>
                    <input type="text" name="cardNumber" class="text" value="${bankCard.cardNumber}" placeholder="请填写银行卡卡号"/>
                </td>
            </tr>
            <tr>
                <th>
                    <span class="requiredField">*</span>开户行:
                </th>
                <td>
                    <input type="text" name="subBranch" class="text" value="${bankCard.subBranch}" placeholder="请填写银行卡开户行"/>
                </td>
            </tr>
            <tr>
                <th>
                    <span class="requiredField">*</span>开户支行:
                </th>
                <td>
                    <input type="text" name="openingBranch" class="text" value="${bankCard.openingBranch}" placeholder="请填写银行卡开户支行"/>
                </td>
            </tr>
            <tr>
                <th>
                    <span class="requiredField">*</span>银行预留号码:
                </th>
                <td>
                    <input type="text" name="phone" class="text" value="${bankCard.phone}" placeholder="请填写开卡时预留的手机号码"/>
                </td>
            </tr>
            <tr>
                <th>
                    <span class="requiredField">*</span>卡型:
                </th>
                <td>
                    <label><input type="radio" name="type" value="deposit" [#if bankCard.type == "deposit"] checked[/#if]> 储蓄卡</label>
                    <label><input type="radio" name="type" value="credit"  [#if bankCard.type == "credit"] checked[/#if]> 信用卡</label>
                </td>
            </tr>
			<tr>
				<th>
					&nbsp;
				</th>
				<td>
					<input type="submit" class="button" value="${message("admin.common.submit")}" />
					<input type="button" class="button" value="${message("admin.common.back")}" onclick="location.href='list.htm'" />
				</td>
			</tr>
		</table>
	</form>
</body>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.tools.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.validate.js"></script>
<script type="text/javascript" src="${base}/resources/admin/editor/kindeditor.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/common.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/input.js"></script>
<script type="text/javascript">
    $().ready(function() {

        var $inputForm = $("#inputForm");
        var $browserButton = $("#browserButton");

    [@flash_message /]

        $browserButton.browser();

        // 表单验证
        $inputForm.validate({
            rules: {
                memberId: "required",
                name: "required",
                cardNumber: {
                    pattern:/^\d{19}$/
                },
                subBranch: "required",
                type: "required",
                phone: {
                    pattern:/^(((13[0-9]{1})|(15[0-9]{1})|(18[0,2,3,5-9]{1})|(17[0-8]{1})|(147))+\d{8})$/
                }
            }
        });

    });
</script>
</html>
